@import '../../themes/mixins/loading-spinner';
@import '../../themes/mixins/error-message';

.component {
  padding: 20px;

  .syncingTransactionsWrapper {
    margin-bottom: 20px;

    :global {
      .LoadingSpinner_component {
        margin-top: 10px;
      }
    }

    .syncingTransactionsText {
      color: var(--theme-transactions-list-group-date-color);
      font-family: var(--font-regular);
      font-size: 16px;
      line-height: 1.38;
      opacity: 0.5;
      text-align: center;
    }
  }

  .walletSendForm {
    .fieldsLine {
      border-bottom: 1px solid var(--theme-transactions-list-item-details-color);
      border-bottom-left-radius: 2px;
      border-left: 1px solid var(--theme-transactions-list-item-details-color);
      height: 125px;
      left: 10px;
      margin-top: -125px;
      opacity: 0.3;
      position: relative;
      top: 115px;
      width: 6px;
    }

    .fieldsContainer {
      display: flex;
      flex-direction: column;
      width: 100%;
    }
  }

  :global {
    .AmountInputSkin_total {
      text-transform: initial !important;
    }
  }
}

.estimatedFeeInput {
  margin-bottom: 30px;

  input {
    background-color: var(--rp-input-bg-color-disabled) !important;
    border-color: var(--rp-input-border-color-disabled) !important;
    font-family: var(--font-regular);
    pointer-events: none;

    &::-webkit-input-placeholder {
      font-family: var(--font-regular);
    }
  }

  &.withOffset {
    margin-bottom: 20px;
  }
}

.minimumAmountNotice {
  align-items: center;
  background-color: var(--rp-input-bg-color-disabled);
  border-radius: 4px;
  color: var(--theme-button-flat-text-color);
  display: flex;
  font-family: var(--font-light);
  font-style: italic;
  line-height: 22px;
  margin: 20px 0 30px 0;
  padding: 14px 20px;
  width: 100%;

  b {
    font-family: var(--font-medium);
    font-weight: normal;
  }
}

.assetInput,
.receiverInput,
.depositInput {
  margin-bottom: 20px;
}

.assetInput,
.receiverInput,
.estimatedFeeInput,
.depositInput {
  position: relative;

  :global {
    .SimpleFormField_error a {
      color: var(--rp-formfield-error-text-color, rgba(222, 50, 38, 0.5));
    }

    .SimpleInput_disabled {
      font-family: var(--font-regular);
    }
  }
}

.receiverInput {
  input {
    display: flex;
    overflow: hidden;
    padding-right: 60px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .clearReceiverContainer {
    bottom: 0;
    display: flex;
    height: 48px;
    line-height: 48px;
    padding-left: 20px;
    position: absolute;
    right: 10px;
  }

  &.sameReceiverInput {
    input {
      border-color: var(--rp-password-input-warning-score-color) !important;
    }
  }
}

.adaInput {
  position: relative;

  .clearAdaContainer {
    align-items: center;
    bottom: 0;
    display: flex;
    height: 48px;
    padding-left: 20px;
    position: absolute;
    right: 50px;
  }

  .dividerContainer {
    margin: 0px;
  }
}

.estimatedFeeInput,
.depositInput {
  :global {
    .AmountInputSkin_total {
      font-family: var(--font-regular);
      left: 95px;
    }
  }
}

.assetInput {
  margin-left: 25px;

  .amountTokenTotal {
    color: var(--theme-input-right-floating-text-color);
    font-family: var(--font-regular);
    font-size: 14px;
    line-height: 1.36;
    position: absolute;
    right: 18px;
    top: 2px;
  }

  input {
    overflow: hidden;
    padding-right: 72px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  :global {
    .AmountInputSkin_total {
      display: none;
    }
  }
}

.adaAmountLabel {
  color: var(--theme-input-placeholder-color);
  font-family: var(--font-regular);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.36;
  position: absolute;
  right: 20px;
  top: 46px;
  z-index: 1;
}

.minAdaRequired {
  color: var(--theme-input-placeholder-color);
  font-family: var(--font-regular);
  font-size: 14px;
  height: 20px;
  line-height: 1.36;
  margin: 10px 0;

  & > span {
    align-items: center;
    display: inline-flex;
    height: 100%;
  }
}

.addAssetButton {
  font-family: var(--font-semibold);
  font-size: 10px;
  font-weight: 500;
  height: 20px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-right: 6px;
  margin-top: 0;
  padding: 0 8px;
  text-transform: uppercase;
  width: auto;

  &.disabled {
    opacity: 0.5;
    pointer-events: none;
  }
}

.calculatingFeesContainer {
  display: flex;
  height: 48px;
  line-height: 48px;
  padding-left: 20px;
  position: absolute;
  right: 11px;
  top: 46.5px;

  span {
    display: flex;
  }

  .calculatingFeesSpinnerButton {
    background-color: var(
      --theme-staking-stake-pools-search-clear-button-background-color
    );
    border-radius: 3px;
    bottom: 5px;
    cursor: pointer;
    height: 28px;
    position: relative;
    width: 28px;

    &:hover {
      background-color: var(
        --theme-staking-stake-pools-search-clear-button-hover-background-color
      );
    }

    .calculatingFeesSpinnerIcon {
      svg {
        height: 10px;
        position: relative;
        top: 0.5px;
        width: 10px;

        path {
          stroke: var(--theme-staking-stake-pools-search-clear-button-color);
        }
      }
    }

    &.spinning {
      @include loading-spinner('../../assets/images/spinner-dark-fees.svg');
    }
  }
}

.adaLabel {
  bottom: 16px;
  color: var(--theme-input-right-floating-text-color);
  font-family: var(--font-light);
  position: absolute;
  right: 20px;
  text-transform: uppercase;
}

.addNewReceiverButton {
  margin-bottom: 20px;
  width: 100%;
}

.buttonsContainer {
  align-items: center;
  display: flex;
  justify-content: center;

  button {
    margin: 0;
    width: 280px;

    & + button {
      margin-left: 20px;
    }
  }
}

.infoIcon {
  opacity: 0.3;
  position: relative;
  top: 0;

  &:hover {
    opacity: 0.5;
  }

  > svg {
    height: 10px;
    width: 10px;
  }

  path {
    fill: var(--theme-input-label-color);
  }
}

.minAdaTooltipContent {
  margin-left: 4px;
}

:global {
  .WalletSendForm_calculatingFeesContainer
    .WalletSendForm_calculatingFeesSpinnerButton.WalletSendForm_spinning {
    cursor: default !important;

    &:after {
      background-size: 12px !important;
      height: 12px !important;
      left: calc(50% - 6px) !important;
      top: calc(50% - 6px) !important;
      width: 12px !important;
    }
  }
}
